import React from 'react'
import style from './style.css'
import MyIconImage from "../../../component/MyIconImage";
import {getHistory} from "../../../util/uitls";

class SettingModalContent extends React.Component {
    constructor(props) {
        super(props);
        this.state = {visible: props.visible,};
    };


    componentWillReceiveProps(nextProps) {
    }


    onClose() {
        this.props.onClose()
    }

    selectitem(item){
        if(item=="add"){
            getHistory().push("/add-friend")
        }
    }
    render() {

        return <section className={style.body}>
            <div className={style.formItem} onClick={this.selectitem.bind(this,"add")}>
                <MyIconImage image={"http://pj5qx5lsj.bkt.clouddn.com/add.png"}/>
                <span className={style.center}>添加朋友</span>
            </div>
        </section>
    }
}

SettingModalContent.defaultProps = {
    popup: false,
    visible: false,
    onClose() {
    },
}
export default SettingModalContent